# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=lire
pkgver=2.1.1
pkgrel=6
pkgdesc="log file analyzer"
arch=(any)
url="https://web-beta.archive.org/web/20140111112049/http://www.logreport.org"
license=('GPL')
depends=('perl-dbd-sqlite' 'perl-libintl-perl' 'perl-curses-ui' 'perl-curses' 'perl-xml-parser')
makedepends=('postfix')
backup=(etc/lire/address.cf
	etc/lire/defaults
	etc/lire/disclaimer
	etc/lire/explanation
	etc/lire/profile_lean
	etc/lire/signature)
options=(zipman docs)
source=(https://launchpad.net/ubuntu/+archive/primary/+files/lire_$pkgver.orig.tar.gz
	pod-fix.patch)
md5sums=('075949a72e7d0e7e133dcfe2e04eec59'
         '2bd98d84fcef0a853f6595e844f151cf')

prepare() {
  cd "$srcdir/$pkgname-$pkgver"
  patch -p1 <"$srcdir"/pod-fix.patch
  sed -i 's|$(dtd_infos)/%:|$(dtd_infos):|' doc/Makefile.in
}

build() {
  cd "$srcdir/$pkgname-$pkgver"
  [ -f Makefile ] || ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
	--with-spooldir=/var/spool/lire  --libexecdir=/usr/lib/ --sbindir=/usr/bin
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir/" install
  rm -f "$pkgdir"/usr/share/man/man3/Time::Timezone.3*
}
